﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace InternshipManagement.Models
{

   [MetadataType(typeof(Company_Validation))]
    public partial class Company{


        public string UserName
        {
            get;
            set;
        }
    }

   public class Company_Validation
    {

        [Required(ErrorMessage = "User Name is required")]
        [StringLength(100, ErrorMessage = "User Name may not be longer than 100 characters")]
        [DisplayName("User Name")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "Company Name is required")]
        [StringLength(100, ErrorMessage = "Company Name may not be longer than 100 characters")]
        [DisplayName("Name")]
        public string Name { get; set; }
      
        [Required(ErrorMessage = "Address is required")]
        [StringLength(200, ErrorMessage = "Address may not be longer than 200 characters")]
        public string Address { get; set; }

        [Required(ErrorMessage = "Phone is required")]
        [StringLength(45, ErrorMessage = "Surname may not be longer than 45 characters")]
        public string Phone { get; set; }
        
    }
}